package com.fjec.common.mybatisx;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.fjec.common.util.SequenceIdGenerator;

public class MyIdGenerator implements IdentifierGenerator {

    private SequenceIdGenerator idGenerator;

    public MyIdGenerator(SequenceIdGenerator idGenerator) {
        this.idGenerator = idGenerator;
    }

    @Override
    public Number nextId(Object entity) {
        return idGenerator.nextId();
    }
}
